package com.blackhorse.dubbo.impl;

import com.blackhorse.dao.ProductDao;
import com.blackhorse.domain.Product;
import com.blackhorse.dubbo.api.ProductService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 商品服务dubbo接口实现类
 */
@org.apache.dubbo.config.annotation.Service
//@Service
public class ProductDubboImpl implements ProductService {
    @Autowired
    private ProductDao productDao;

    @Override
    public Product findByPid(Integer pid) {
        return productDao.findById(pid).orElse(null);
    }
}
